package model;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import pizza.admin.entity.User;

/**
 * 
 * @author Radoslav Stoyanov
 *
 */
@XmlRootElement
@XmlType(propOrder = {"id", "name", "surname", "username"})
public class XmlUser {
	private Integer id;
	private String name;
	private String surname;
	private String username;

	public XmlUser(Integer id, String name, String surname,
			String username) {
		this.id = id;
		this.name = name;
		this.surname = surname;
		this.username = username;
	}

	public XmlUser() {
		this.id = null;
		this.name = "";
		this.surname = "";
		this.username = "";
	}

	public XmlUser(User user) {
		this.id = user.getId();
		this.name = user.getName();
		this.surname = user.getSurname();
		this.username = user.getUsername();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

}
